package com.example.rpc_core.register;

import com.example.rpc_core.register.impl.EtcdRegister;
import com.example.rpc_core.spi.SpiLoader;

public class RegistryFactory {
    //加载注册中心实现类
    static {
        SpiLoader.load(Register.class);
    }

    private static final Register DEFAULT_REGISTRY =new EtcdRegister();

    public static Register getRegistry(String name){
        return SpiLoader.getInstance(Register.class, name);
    }
}
